<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>

<body>
    <script type="text/javascript">
        function sortNumber(a, b) {
           
            return a - b
        }

        var arr = [10, 5, 40, 25, 1000, 1]

        document.write(arr + "<br />")
        document.write(arr.sort(sortNumber));// 1 5 10 25 40 1000 从小到大

        function next(){
          setTimeout(() => {
              console.log(111);
          })
        }
        async function get(){
            await next();
            console.log('输出');
        }
        get();

        var a = 1;
        var obj = {
            a:2,
            f:function(){
                (()=>{
                    var a = 3;
                    console.log(this.a);
                })()
            }
        }
        obj.f();
    </script>
</body>

</html>